widget: Use CSS boxes in gtk_widget_real_contains()
authorTimm Bäder <mail@baedert.org>
Tue, 19 Feb 2019 16:19:23 +0000 (17:19 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 19 Feb 2019 18:22:09 +0000 (19:22 +0100)
gtk/gtkwidget.c

index a139d2957925471fd37433c747478389a43e8192..0ba379e23a3a3411c6dec461d87c530b3bfe90fe 100644 (file)
@@ -799,12 +799,12 @@ gtk_widget_real_contains (GtkWidget *widget,
                           gdouble    x,
                           gdouble    y)
 {
-  graphene_rect_t widget_bounds;
+  GtkCssBoxes boxes;
 
-  gtk_widget_compute_bounds (widget, widget, &widget_bounds);
+  gtk_css_boxes_init (&boxes, widget);
 
   /* XXX: This misses rounded rects */
-  return graphene_rect_contains_point (&widget_bounds,
+  return graphene_rect_contains_point (gtk_css_boxes_get_border_rect (&boxes),
                                        &(graphene_point_t){x, y});
 }